import http from './http'

// 订单（通用）
export const listOrders = (params) => http.get('/orders', { params })
export const updateOrderStatus = (orderId, params) => http.put(`/orders/${orderId}/status`, null, { params })

// 标本模块（通用）
export const createSample = (data) => http.post('/samples', data)
export const updateSampleStatus = (id, params) => http.put(`/samples/${id}/status`, null, { params })
export const listSamples = (params) => http.get('/samples', { params })
export const samplesStats = () => http.get('/samples/stats')

// 指标结果模块（通用）
export const createIndicatorResult = (data) => http.post('/indicator-results', data)
export const updateIndicatorResult = (id, params) => http.put(`/indicator-results/${id}`, null, { params })
export const listIndicatorResults = (params) => http.get('/indicator-results', { params })
export const listIndicatorResultsByUserOrOrder = (params) => http.get('/indicator-results/by-user-or-order', { params })